package com.farewell.blog.pojo;


import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.annotations.TableName;
import com.baomidou.mybatisplus.enums.IdType;
import lombok.Data;

import java.io.Serializable;
import java.util.List;

/**
 * @author Farewell
 * @date 2021/2/1
 * <p>
 * 博客类型类
 */
@Data
@TableName("t_type")
public class Type implements Serializable {
    @TableId(type = IdType.AUTO)
    private Long id;
    private String name;
    @TableField(exist = false)
    private Long total;
    @TableField(exist = false)
    private List<Blog> blogList;

    public Type() {
    }

    public Type(Long id, String name, Long total) {
        this.id = id;
        this.name = name;
        this.total = total;
    }
}
